-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] Added Payment Gateway Stripe #106
Conversation
✅ Deploy Preview for merch-site canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also could you add a default choice for status
in ticket
model? Everything else looks great, tested webhook endpoint locally. Could not test payment-intent endpoint but should work correctly.
|
||
try : | ||
event = stripe.Webhook.construct_event( | ||
payload, sig_header, settings.STRIPE_WEBHOOK_SECRET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no variable named STRIPE_WEBHOOK_SECRET
in settings
def post(self, request, *args, **kwargs): | ||
amount = request.data.get('amount') | ||
print(request.data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a super().save function in backend/tickets/models.py, to have a full clean
something along the lines of
def save(self, *args, **kwargs):
self.full_clean()
super().save(*args, **kwargs)
Full clean cleans each individual field, and will validate all fields on the model
Overview
We have also created a webhook to check the status of the payment iniitiated by the user and on that basis only we will be updating the status of the ticket.
This still needs to be tested with the TESTING CREDENTIALS.
Essential Checklist
Proof that changes are correct
PR Pointers